<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class Linkslistsreports extends Model
{
    protected $table = 'links_lists_reports';
    protected $primaryKey = 'id';

    public static function getLinksListsReports($links_id)
    {
        return self::where("links_id",$links_id)->orderBy("id","DESC")->paginate(25);
    }

    public static function insertLinksListsReports($links_id,$report,$appid,$message,$ip)
    {
        return self::insert(["links_id"=>$links_id,"report"=>$report,"appid"=>$appid,"message"=>$message,"ip"=>$ip,"created_at"=>time()]);
    }
}
